<?
	$tab_addReserve    	= "";
	$tab_manageClasses 	= "";
	$tab_manageUser    	= "";
	$tab_myReserves		= "";
	$tab_reserves		= "";	
	$tab_search			= "";
	$tab_reports		= "";
	$tab_admin			= "";
	$tab_selector = "tab_".$page;
	$$tab_selector = "id=\"current\"";
	
	//Tab index defines order of tabs aphabetically hense the aa, y and z prefixes
	$tabs = array();
	$tabs['aamyReserves']		= "<li $tab_myReserves><a href=\"index.php\">My Courses</a></li>\n";
	$tabs['addReserves']	= null;
	$tabs['manageClasses']	= null;
	$tabs['manageUser']	= null;
	$tabs['ySearch']		= null;
	$tabs['zReports']		= null;
	$tabs['zzAdmin']		= null;
	
	switch ($_SESSION['userclass'])
	{
		case 'admin':
			$tabs['zzAdmin']	= "<li $tab_admin><a href=\"index.php?cmd=admin\">Admin</a></li>\n";
		case 'staff':
			$tabs['addReserve']	= "<li $tab_addReserve><a href=\"index.php?cmd=addReserve\">Manage Items</a></li>\n";
			$tabs['manageClasses'] 	= "<li $tab_manageClasses><a href=\"index.php?cmd=manageClasses\">Manage Classes</a></li>\n";
			$tabs['manageUser'] = "<li $tab_manageUser><a href=\"index.php?cmd=manageUser\">Manage Users</a></li>\n";
			$tabs['ySearch']	= "<li $tab_search><a href=\"index.php?cmd=searchTab\">Search</a></li>\n";
			$tabs['zReports']	= "<li $tab_reports><a href=\"index.php?cmd=reportsTab\">View Statistics</a></li>\n";			
		break;
			
		case 'instructor':
			$tabs['addReserve']	   	= "<li $tab_addReserve><a href=\"index.php?cmd=addReserve\">Add a Reserve</a></li>\n";	
			$tabs['manageUser']	   	= "<li $tab_manageUser><a href=\"index.php?cmd=manageUser\">Manage Users</a></li>\n";
			$tabs['zReports']			= "<li $tab_reports><a href=\"index.php?cmd=reportsTab\">View Statistics</a></li>\n";
		case 'proxy':
		break;
		
		case 'custodian':
			$tabs['manageUser']	= "<li $tab_manageUser><a href=\"index.php?cmd=manageUser\">Manage Users</a></li>\n";
		break;

	}
	
	ksort($tabs);
?>


		<div id="mainNav">
		    <ul>
				<? foreach(array_keys($tabs) as $k) if (!is_null($tabs[$k])) echo $tabs[$k]; ?>
		    </ul>
  	  	</div>

